home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / LOCATE-1.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  783b  |  28 lines

  1. ' LOCATE-1.BAS
  2. ' This program demonstrates the LOCATE statement.
  3.  
  4. CLS
  5.  
  6. INPUT "Please enter the row coordinate (1-24):  ", rowNum%
  7. PRINT
  8. INPUT "Please enter the column coordinate (1-80):  ", colNum%
  9. PRINT
  10. INPUT "Please enter a message to display:  ", message$
  11.  
  12. CLS
  13.  
  14. FOR i% = 0 TO 70 STEP 10      ' print column coordinates across
  15.     PRINT "1234567890";       '   the top of the screen
  16. NEXT i%
  17.  
  18. FOR i% = 2 TO 23              ' print the row numbers along the
  19.     LOCATE i%, 1              '   left-hand side of the screen
  20.     PRINT LTRIM$(STR$(i%))    ' don't print the blank space
  21. NEXT i%                       '   before each number
  22.  
  23. LOCATE rowNum%, colNum%       ' print the message at the user-
  24. PRINT message$                '   supplied coordinates
  25.  
  26.  
  27.  
  28.